package com.example.shopspring.Mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.shopspring.Model.Cart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CartMapper extends BaseMapper<Cart> {
    @Select("select * from carts where productId = #{productId} and username = #{username}")
    Cart selectCartByCart(int productId, String username);

    @Select("select * from carts where username = #{username}")
    List<Cart> selectListByusername(String username);
}
